<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0043)http://localhost:8080/mango/cart/list.jhtml -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<title>OrderList</title>
<link href="${ pageContext.request.contextPath}/css/common.css" rel="stylesheet" type="text/css"/>
<link href="${ pageContext.request.contextPath}/css/cart.css" rel="stylesheet" type="text/css"/>

</head>
<body>

<div class="container">

		<%@ include file="menu.jsp" %>

</div>	

<div class="container cart">

		<div class="span24">
		
			<div class="step step1">
				<ul>
					
					<li  class="current"></li>
					<li ><center><h3>我的订单显示</h3></center> </li>
				</ul>
			</div>
	
		
			<table>
				<tbody>
				 <s:iterator var="order" value="pageBean.list" > 
				 	<tr>
				 		<td align="center" colspan="5" height="20" >
				 			<font color="green" >本订单</font>
				 		</td>
				 	</tr>
					<tr>
						<td align="right" colspan="5">订单编号：<s:property value="#order.oid"/>
							&nbsp;&nbsp; 订单状态：
							<s:if test="#order.state == 1">
								<a href=" ${pageContext.request.contextPath}/order_findByOid.action?oid=<s:property value="#order.oid"/>" ><font color="blue" >付款</font></a>
							</s:if>  
							<s:if test="#order.state == 2">
								<a href="#" ><font color="red" >已经付款</font></a>
							</s:if>  
							<s:if test="#order.state == 3 ">
								<a href="${pageContext.request.contextPath}/order_updateState.action?oid=<s:property value="#order.oid" />" >
								<font color="pink" >确认收货</font></a>
							</s:if>  
							<s:if test="#order.state == 4 ">
								<a href="#" ><font color="orange" >交易完成</font></a>
							</s:if>  <!-- ${pageContext.request.contextPath}/order_.action?oid=  -->
						 </td>
					</tr>
					<tr>
						<th>图片</th>
						<th>商品</th>
						<th>价格</th>
						<th>数量</th>
						<th>小计</th>
						<!-- <th>操作</th> -->
					</tr>
					<s:iterator var="oI" value="#order.orderItems" >
					
						<tr>
							<td width="60">
								<input type="hidden" name="id" value="22"/>
								<img src="${pageContext.request.contextPath}/<s:property value="#oI.product.image"/>"/>
							</td>
							<td>
								<a target="_blank" href="${pageContext.request.contextPath }/product_findByPid.action?pid=<s:property value="#oI.product.pid"/>">
								<s:property value="#oI.product.pname"/></a>
							</td>
							<th>
								<s:property value="#oI.product.shop_price"/>
							</th>
							<td class="count" width="5%">
								<s:property value="#oI.count"/>
							</td>
							<td width="140">
								<span class="subtotal">￥<s:property value="#oI.subtotal"/></span>
							</td>
							<!-- <td>
								<a href="./cart_removeCart.action?pid=1" class="delete">删除</a>
							</td> -->
						</tr>
						
					</s:iterator>
						<tr>
							<td align="left" colspan="5" >
								<em id="promotion"></em>
								订单总金额: <strong id="effectivePrice">￥<s:property value="#order.total"/>元</strong>
							</td>
						</tr>
				</s:iterator> 
					<tr>
						<td colspan="5" >
							<div class="pagination">
								<s:if test=" pageBean.page != null" >
									<span>第<s:property value="pageBean.page"/>/<s:property value="pageBean.totalPage"/>页</span>
									<s:if test="pageBean.page !=1 " >
										<a href=" ${pageContext.request.contextPath }/order_findByUid.action?page=1 "class="firstPage">
										&nbsp;</a>
										<a href=" ${pageContext.request.contextPath }/order_findByUid.action?page=<s:property value="pageBean.page-1"/>" class="previousPage">	&nbsp;</a>
									</s:if>
									<s:iterator var="i"  begin="1"  end="pageBean.totalPage" >
										<s:if test="pageBean.page != #i" >
											<a href=" ${pageContext.request.contextPath }/order_findByUid.action?page=<s:property value="#i"/>" >
											 <s:property value="#i" /> </a>
										</s:if>
										<s:else>
											<span class="currentPage" > <s:property value="#i" /> </span>
										</s:else>
									</s:iterator> 
								
									<s:if test="pageBean.page !=  pageBean.totalPage"   >
										<a  href=" ${pageContext.request.contextPath }/order_findByUid.action?page=<s:property value="pageBean.page+1"/>" class="nextPage" >
										&nbsp;</a>
										
										<a  href=" ${pageContext.request.contextPath }/order_findByUid.action?page=<s:property value="pageBean.totalPage"/>" class="lastPage" >
										&nbsp;</a>
									</s:if>
								</s:if>
	
							</div>
							
						</td>
						
					</tr>
				</tbody>
			</table>
		</div>
	</div>
<div class="container footer">
	<div class="span24">
		<div class="footerAd">
					<img src="image\r___________renleipic_01/footer.jpg" alt="我们的优势" title="我们的优势" height="52" width="950" />
</div>
</div>
	<div class="span24">
		<ul class="bottomNav">
					<li>
						<a href="#">关于我们</a>
						|
					</li>
					<li>
						<a href="#">联系我们</a>
						|
					</li>
					<li>
						<a href="#">诚聘英才</a>
						|
					</li>
					<li>
						<a href="#">法律声明</a>
						|
					</li>
					<li>
						<a>友情链接</a>
						|
					</li>
					<li>
						<a target="_blank">支付方式</a>
						|
					</li>
					<li>
						<a target="_blank">配送方式</a>
						|
					</li>
					<li>
						<a >SHOP++官网</a>
						|
					</li>
					<li>
						<a>SHOP++论坛</a>
						
					</li>
		</ul>
	</div>
	<div class="span24">
		<div class="copyright">Copyright © 2005-2015 网上商城 版权所有</div>
	</div>
</div>
</body>
</html>